package com.jeffse.light.stream.core.service;

import com.jeffse.light.stream.core.pojo.WaterMark;

import java.io.Serializable;

public interface TimerService<T, V> extends Serializable {
    long currentProcessingTime();

    long currentWatermark();

    void registerProcessingTimeTimer(long time);

    void registerEventTimeTimer(long time);

    void deleteProcessingTimeTimer(long time);


    void deleteEventTimeTimer(long time);

    /**
     * 触发event时间事件
     */
    void triggerEvent() throws Exception;

    /**
     * 设置waterMark
     * @param waterMark
     */
    public void waterMark(WaterMark waterMark);
}